﻿<?php
require_once("conn.php");//引用数据库链接文件
$wnan = $_GET['wnan'];//GET方法为URL参数传递
$pl = $_GET['p']; 

if ( strlen($wnan) > 0 )
{

if ( strlen($pl) > 0 )
{
//INSERT INTO `rx_wnan`(`time`, `wnan`) VALUES (CURRENT_TIMESTAMP,"|fffewfraf|aefadsfafas")
$sql = "INSERT INTO `rx_wnan`(`time`, `wnan`) VALUES (CURRENT_TIMESTAMP,'$wnan&p=$pl')";
} else 
{
//INSERT INTO `rx_wnan`(`time`, `wnan`) VALUES (CURRENT_TIMESTAMP,"|fffewfraf|aefadsfafas")
$sql = "INSERT INTO `rx_wnan`(`time`, `wnan`) VALUES (CURRENT_TIMESTAMP,'$wnan')";
}

mysql_query($sql);//借SQL语句插入数据

}

mysql_close();//关闭MySQL连接
// echo '".$id.'<p>' written.<br>";
// echo "<p align='center'><font color='#6CC'; size=26px;>".$_GET['id']."&nbsp</font></p>";
//echo $query;
?>